/*
Rilego - An easy Images 2 E-Book converter.
Copyright (C) 2011  Federico Improta (Kirys)

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
*/

package it.kirys.rilego.engine.outputbuilders;

/**
 *
 * @author Federico Improta
 */
public enum MediaType implements IMediaType {

	A4("A4", new MediaBoxSize(21.0f, 29.7f)),
	ColorTablet("ColorTablet", new MediaBoxSize(21.0f, 29.7f)),
	BOOXM90("Boox M90", new MediaBoxSize(21.0f, 30.57f), new ImageSize(825, 1200, ColorPalette.GRAY_16_SHADES)),
	ILIAD("ILIAD", new MediaBoxSize(21.0f, 25.57f), new ImageSize(768, 935, ColorPalette.GRAY_16_SHADES)),
	PRS500("Sony PRS 500", new MediaBoxSize(21.0f, 27.12f), new ImageSize(583, 753, ColorPalette.GRAY_8_SHADES));

	public String getLabel() {
		return label;
	}

	@Override
	public String toString() {
		return label;
	}

	private String label;
	private MediaBoxSize mediaBoxSize;
	private ImageSize preferredResolution;

	private MediaType(String label, MediaBoxSize mediaBoxSize) {
		this.label = label;
		this.mediaBoxSize = mediaBoxSize;
		this.preferredResolution=null;
	}

	private MediaType(String label, MediaBoxSize mediaBoxSize, ImageSize preferredResolution) {
		this.label = label;
		this.mediaBoxSize = mediaBoxSize;
		this.preferredResolution = preferredResolution;
	}


	@Override
	public MediaBoxSize getMediaBoxSize() {
		return mediaBoxSize;
	}

	@Override
	public ImageSize getPreferredResolution() {
		return preferredResolution;
	}

	@Override
	public boolean hasPreferredResolution() {
		return preferredResolution!=null;
	}



}
